function [res,acc] = readProbOutput(fname, lbl)
fid = fopen(fname,'r');
lbls = fgetl(fid);
count = 0;
while 1
    tline = fgetl(fid);
    if ~ischar(tline), break, end
    count = count + 1;
end
res = zeros(count, 1);
fseek(fid, 0, 'bof');
lbls = fgetl(fid);
slbl = num2str(lbl);
for i=1:count
    tline = fgetl(fid);
    res(i) = (tline(1) ~= slbl);
end
acc = sum(res)/count
end